﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using MJM.RPP.EntidadesNegocio;
using MJM.SPP.EntidadesNegocio;
using MJM.Principal;

namespace wRegPadron
{
    public partial class frmConfirma : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string param1 = Request.QueryString["ID"].ToString();
            string param2 = Request.QueryString["User"].ToString();
            UsuarioE objEN = MediadorCN.GetUsuario().ValidaCuenta(param2, param1);
            if(objEN!=null)
            { 
                if(objEN.Eliminado==2)
                {
                    objEN.Eliminado=1;
                    MediadorCN.GetUsuario().ActualizaEstado(objEN);
                    Session.Add("Activado","1");
                }
                else
                {
                    Session.Add("Activado","2");
                }
            }
            else
                Session.Add("Activado", "3");
            Response.Redirect("Login.aspx");
        }
    }
}
